<extend name="Public/base" />
<block name="content">
<script src="__JS__/jjhh.js?v={:C('TKE_VERSION')}"></script>
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a class="tip-bottom" href="{:U('Index/index')}" data-original-title="首页"><i class="icon-home"></i> 首页</a>
			<a class="tip-bottom" href="{:U('Shop/shopCategory')}" data-original-title="">{$meta_title_c}</a>
			<a class="current" href="{$post_url}">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<br/>
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-align-justify"></i></span>
						<h5>{$meta_title}</h5>
					</div>
					<div class="widget-content nopadding">
						<form class="form-horizontal" method="post" action="">
							
							<div class="control-group">
								<notempty name='list'>
									<label class="control-label">店铺品类名称:</label>
								<else/>
									<label class="control-label"><font color="red">*</font>店铺品类名称:</label>
								</notempty>
								<div class="controls">
									<input type="text"  maxlength="10"  placeholder="店铺品类名称1-10个字符" class="ui-wizard-content span3" name="shop_category_name" value="{$list.shop_category_name|htmlspecialchars}" >
								</div>
								
								<div class="control-group">
									<label class="control-label">排序:</label>
									<div class="controls">
										<input type="text" placeholder="必须为数字" class="ui-wizard-content span3"  maxlength="7" name="sort" value="<if condition='$list["sort"]'>{$list.sort|htmlspecialchars}<else />0</if>" >
									</div>
								</div>
								
							</div>
							<div class="form-actions">
								<button class="btn btn-success" type="submit">提交</button>
								<button type="button" class="btn btn-danger" onclick="javascript:history.back(-1);return false;">返 回</button>
							</div>
							<input type="hidden" name="shop_category_id" value="{$list.shop_category_id}"/>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	//省市区联动
	//初始化登录用户名输入焦点
	tke_form_focus();
	$("form").submit(function(){
		//锁定登录按钮
		$('button').attr('disabled',true);
		var self = $(this);
		$.post("{$post_url}", self.serialize(), call_back, "json");
		return false;
		
		/**
		* @todo 接收登录返回值
		* @author PHP@妖孽 <dino_ma@163.com>
		*/
		function call_back(data){
			if(data.status==1){
				tke_alert(data.info,'alert-success');
				setTimeout(function(){
				if (data.url) {
						location.href=data.url;
					}else{
						location.reload();
					}
				},1500);
			} else {
				$('button').attr('disabled',false);
				tke_alert(data.info,'alert-error');
			}
		}
	});
	//导航高亮
	highlight_subnav("{:U('Shop/shopCategory')}");
});
</script>
</block>